<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>变量提升</title>
</head>

<body>
  <script>
    // ============================== 变量提升 ==============================
    // 1. var变量提升会提升到当前作用域的最前面
    // 2. 只提升变量声明，不提升变量赋值

    var a = 10
    console.log(a)

  </script>
</body>

</html>